Skip to content

CONSOLE-5281: Migrate Cypress E2E tests to Playwright (batch 2)#16454

Open
rhamilto wants to merge 1 commit into
openshift:mainfrom
rhamilto:CONSOLE-5281
Open

CONSOLE-5281: Migrate Cypress E2E tests to Playwright (batch 2)#16454
rhamilto wants to merge 1 commit into
openshift:mainfrom
rhamilto:CONSOLE-5281

Conversation

@rhamilto
Copy link
Copy Markdown
Member

@rhamilto rhamilto commented May 15, 2026

Includes changes from #16444

Summary

  • Migrates CRD extensions, events, favorites, i18n pseudolocalization, alertmanager, and OLM create-namespace Cypress tests to Playwright
  • Removes orphaned Cypress alertmanager test files and the alertmanager.ts view file
  • Adds data-test attributes alongside existing data-test-id attributes on utilization cards, text filter, and external links to enable getByTestId usage
  • Adds createPod and deletePod methods to KubernetesClient
  • Adds AlertmanagerPage page object and navigation helpers
  • Uses condition-based waits throughout (no waitForTimeout or networkidle anti-patterns)
  • Accepts K8sModel | undefined in useCRDAdditionalPrinterColumns hook signature

Tests migrated (19 Cypress → 19 Playwright)

Cypress source Playwright output
integration-tests/tests/crd-extensions/console-cli-download.cy.ts e2e/tests/console/crd-extensions/console-cli-download.spec.ts
integration-tests/tests/crd-extensions/console-external-log-link.cy.ts e2e/tests/console/crd-extensions/console-external-log-link.spec.ts
integration-tests/tests/crd-extensions/console-link.cy.ts e2e/tests/console/crd-extensions/console-link.spec.ts
integration-tests/tests/crd-extensions/console-notification.cy.ts e2e/tests/console/crd-extensions/console-notification.spec.ts
integration-tests/tests/crd-extensions/console-yaml-sample.cy.ts e2e/tests/console/crd-extensions/console-yaml-sample.spec.ts
integration-tests/tests/events/events.cy.ts e2e/tests/console/events/events.spec.ts
integration-tests/tests/favorite/favorite-option.cy.ts e2e/tests/console/favorites/favorites.spec.ts
integration-tests/tests/i18n/pseudolocalization.cy.ts e2e/tests/console/i18n/pseudolocalization.spec.ts
olm/integration-tests/tests/create-namespace.cy.ts e2e/tests/olm/create-namespace.spec.ts
integration-tests/tests/cluster-settings/alertmanager/alertmanager.cy.ts e2e/tests/console/cluster-settings/alertmanager/alertmanager.spec.ts
integration-tests/tests/cluster-settings/alertmanager/receivers/email.cy.ts e2e/tests/console/cluster-settings/alertmanager/receivers/email.spec.ts
integration-tests/tests/cluster-settings/alertmanager/receivers/pagerduty.cy.ts e2e/tests/console/cluster-settings/alertmanager/receivers/pagerduty.spec.ts
integration-tests/tests/cluster-settings/alertmanager/receivers/slack.cy.ts e2e/tests/console/cluster-settings/alertmanager/receivers/slack.spec.ts
integration-tests/tests/cluster-settings/alertmanager/receivers/webhook.cy.ts e2e/tests/console/cluster-settings/alertmanager/receivers/webhook.spec.ts

Cypress cleanup

  • Deleted integration-tests/views/alertmanager.ts (only consumed by the migrated alertmanager tests)

Source component changes

  • text-filter.tsx: Added data-test="item-filter" alongside data-test-id
  • utilization-card.tsx (3 files): Added data-test="utilization-card" alongside data-test-id
  • useCRDAdditionalPrinterColumns.ts: Fixed react-hooks/exhaustive-deps lint warning; updated model param to accept K8sModel | undefined
  • ExternalLink.tsx: Added data-test attribute

Screenshots / Screen recordings

Automated test migration — no visual changes

Test plan

  • All migrated Playwright tests pass locally (CRD extensions, events, favorites, i18n, alertmanager main, OLM)
  • Alertmanager receiver tests have pre-existing flakes unrelated to migration (identical results with original Cypress cy.wait(10000))
  • TypeScript type-checking passes
  • ESLint passes
  • CI passes
  • No orphaned resources after test runs

🤖 Generated with Claude Code

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label May 15, 2026
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

openshift-ci-robot commented May 15, 2026

@rhamilto: This pull request references CONSOLE-5281 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set.

Details

In response to this:

Summary

  • Migrates CRD extensions, events, favorites, i18n pseudolocalization, alertmanager, and OLM create-namespace Cypress tests to Playwright
  • Adds data-test attributes alongside existing data-test-id attributes on utilization cards, text filter, and console select items to enable getByTestId usage
  • Adds createPod and deletePod methods to KubernetesClient
  • Adds AlertmanagerPage page object and navigation helpers

Tests migrated (19 Cypress → 19 Playwright)

Cypress source Playwright output
integration-tests/tests/crd-extensions/console-cli-download.cy.ts e2e/tests/console/crd-extensions/console-cli-download.spec.ts
integration-tests/tests/crd-extensions/console-external-log-link.cy.ts e2e/tests/console/crd-extensions/console-external-log-link.spec.ts
integration-tests/tests/crd-extensions/console-link.cy.ts e2e/tests/console/crd-extensions/console-link.spec.ts
integration-tests/tests/crd-extensions/console-notification.cy.ts e2e/tests/console/crd-extensions/console-notification.spec.ts
integration-tests/tests/crd-extensions/console-yaml-sample.cy.ts e2e/tests/console/crd-extensions/console-yaml-sample.spec.ts
integration-tests/tests/events/events.cy.ts e2e/tests/console/events/events.spec.ts
integration-tests/tests/favorite/favorite-option.cy.ts e2e/tests/console/favorites/favorites.spec.ts
integration-tests/tests/i18n/pseudolocalization.cy.ts e2e/tests/console/i18n/pseudolocalization.spec.ts
olm/integration-tests/tests/create-namespace.cy.ts e2e/tests/olm/create-namespace.spec.ts
integration-tests/tests/alertmanager/alertmanager.cy.ts e2e/tests/console/cluster-settings/alertmanager/alertmanager.spec.ts
integration-tests/tests/alertmanager/receivers/email.cy.ts e2e/tests/console/cluster-settings/alertmanager/receivers/email.spec.ts
integration-tests/tests/alertmanager/receivers/pagerduty.cy.ts e2e/tests/console/cluster-settings/alertmanager/receivers/pagerduty.spec.ts
integration-tests/tests/alertmanager/receivers/slack.cy.ts e2e/tests/console/cluster-settings/alertmanager/receivers/slack.spec.ts
integration-tests/tests/alertmanager/receivers/webhook.cy.ts e2e/tests/console/cluster-settings/alertmanager/receivers/webhook.spec.ts

Source component changes

  • text-filter.tsx: Added data-test="item-filter" alongside data-test-id
  • console-select.tsx: Changed shared data-test="console-select-item" to unique data-test={console-select-item-${itemKey}}
  • utilization-card.tsx (3 files): Added data-test="utilization-card" alongside data-test-id
  • useCRDAdditionalPrinterColumns.ts: Fixed react-hooks/exhaustive-deps lint warning
  • ExternalLink.tsx: Added data-test attribute

Test plan

  • All migrated Playwright tests pass locally
  • CI passes
  • No orphaned resources after test runs

🤖 Generated with Claude Code

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 15, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 15, 2026

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci openshift-ci Bot added component/core Related to console core functionality component/dashboard Related to dashboard approved Indicates a PR has been approved by an approver from all required OWNERS files. component/olm Related to OLM component/shared Related to console-shared kind/cypress Related to Cypress e2e integration testing labels May 15, 2026
@rhamilto rhamilto force-pushed the CONSOLE-5281 branch 3 times, most recently from 074fbfd to 0b4f078 Compare May 18, 2026 17:31
@rhamilto rhamilto changed the title WIP: CONSOLE-5281: Migrate Cypress E2E tests to Playwright (batch 2) CONSOLE-5281: Migrate Cypress E2E tests to Playwright (batch 2) May 18, 2026
@openshift-ci openshift-ci Bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 19, 2026
@openshift-ci openshift-ci Bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 19, 2026
@rhamilto rhamilto marked this pull request as ready for review May 19, 2026 13:48
@openshift-ci openshift-ci Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 19, 2026
@openshift-ci openshift-ci Bot requested review from spadgett and stefanonardo May 19, 2026 13:49
@rhamilto
Copy link
Copy Markdown
Member Author

/unhold

@rhamilto
Copy link
Copy Markdown
Member Author

tech debt
/label px-approved
/label docs-approved
/verified by @rhamilto

@openshift-ci openshift-ci Bot added px-approved Signifies that Product Support has signed off on this PR docs-approved Signifies that Docs has signed off on this PR labels May 19, 2026
@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label May 19, 2026
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@rhamilto: This PR has been marked as verified by @rhamilto.

Details

In response to this:

tech debt
/label px-approved
/label docs-approved
/verified by @rhamilto

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@rhamilto
Copy link
Copy Markdown
Member Author

/retest

@openshift-ci openshift-ci Bot added the tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. label May 20, 2026
Comment thread frontend/e2e/clients/kubernetes-client.ts Outdated
Comment thread frontend/e2e/clients/kubernetes-client.ts Outdated
Comment thread frontend/e2e/pages/alertmanager-page.ts Outdated
…anager, and OLM Cypress tests to Playwright

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@rhamilto
Copy link
Copy Markdown
Member Author

Comments addressed. Thanks, @stefanonardo.

@stefanonardo
Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label May 20, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 20, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rhamilto, stefanonardo

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@rhamilto
Copy link
Copy Markdown
Member Author

/retest

7 similar comments
@rhamilto
Copy link
Copy Markdown
Member Author

/retest

@rhamilto
Copy link
Copy Markdown
Member Author

/retest

@rhamilto
Copy link
Copy Markdown
Member Author

/retest

@rhamilto
Copy link
Copy Markdown
Member Author

/retest

@rhamilto
Copy link
Copy Markdown
Member Author

/retest

@rhamilto
Copy link
Copy Markdown
Member Author

/retest

@rhamilto
Copy link
Copy Markdown
Member Author

/retest

@rhamilto
Copy link
Copy Markdown
Member Author

/verified by CI

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label May 26, 2026
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@rhamilto: This PR has been marked as verified by CI.

Details

In response to this:

/verified by CI

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@rhamilto
Copy link
Copy Markdown
Member Author

/retest

@openshift-merge-bot
Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD 397d1b3 and 2 for PR HEAD cdeec4b in total

@openshift-merge-bot
Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD b333b29 and 1 for PR HEAD cdeec4b in total

@openshift-merge-bot
Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD c0ecf9f and 0 for PR HEAD cdeec4b in total

@openshift-merge-bot
Copy link
Copy Markdown
Contributor

/hold

Revision cdeec4b was retested 3 times: holding

@openshift-ci openshift-ci Bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 27, 2026
@rhamilto
Copy link
Copy Markdown
Member Author

/retest
/unhold

@openshift-ci openshift-ci Bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 27, 2026
@rhamilto
Copy link
Copy Markdown
Member Author

/retest

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 27, 2026

@rhamilto: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-gcp-console cdeec4b link true /test e2e-gcp-console

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. component/core Related to console core functionality component/dashboard Related to dashboard component/olm Related to OLM component/shared Related to console-shared docs-approved Signifies that Docs has signed off on this PR jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. kind/cypress Related to Cypress e2e integration testing lgtm Indicates that a PR is ready to be merged. px-approved Signifies that Product Support has signed off on this PR tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants